package com.wmeimob.fastboot.jiubei.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;


/**
 * UserAddress.java
 * http://www.wmeimob.com
 * Copyright © 2018 wmeimob All Rights Reserved,version 1.0
 *
 * @author：wjt Tue Aug 18 16:45:30 CST 2020 Created
 */

@Table(name = "`user_address`")
@NoArgsConstructor
@AllArgsConstructor
@Builder
@Data
public class UserAddress implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * Id
     */
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Integer id;
    /**
     * UserId
     */
    @Column(name = "user_id")
    private Long userId;
    /**
     * 收件人名
     */
    @Column(name = "name")
    private String name;
    /**
     * 联系电话
     */
    @Column(name = "mobile")
    private String mobile;

    /**
     * 省id
     */
    @Column(name = "province_id")
    private Integer provinceId;
    /**
     * 省
     */
    @Column(name = "province")
    private String province;
    /**
     * 市id
     */
    @Column(name = "city_id")
    private Integer cityId;
    /**
     * 市
     */
    @Column(name = "city")
    private String city;
    /**
     * 区id
     */
    @Column(name = "district_id")
    private Integer districtId;
    /**
     * 区
     */
    @Column(name = "district")
    private String district;
    /**
     * 详细地址
     */
    @Column(name = "address")
    private String address;
    /**
     * 详细地址(门牌号)
     */
    @Column(name = "address_detail")
    private String addressDetail;
    /**
     * 地址名称
     */
    @Column(name = "address_name")
    private String addressName;
    /**
     * 是否默认，1是，0否
     */
    @Column(name = "is_default")
    private Boolean isDefault;
    /**
     * 创建时间
     */
    @Column(name = "gmt_create")
    @JsonFormat(locale = "zh", pattern = "yyyy-MM-dd HH:mm:ss")
    private Date gmtCreate;
    /**
     * 修改时间
     */
    @Column(name = "gmt_modified")
    @JsonFormat(locale = "zh", pattern = "yyyy-MM-dd HH:mm:ss")
    private Date gmtModified;

}